package com.free.system.api.factory;

import com.free.common.core.web.domain.R;
import com.free.system.api.RemoteNoteService;
import com.free.system.api.domain.ZoneNote;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 用户服务降级处理
 *
 * @author free
 */
@Component
public class RemoteNoteFallbackFactory implements FallbackFactory<RemoteNoteService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteNoteFallbackFactory.class);


    /**
     * @param cause
     * @return
     */
    @Override
    public RemoteNoteService create(Throwable cause) {
        return new RemoteNoteService() {

            /**
             * 获取一个需要识别的记录
             */
            @Override
            public R getNeedRecognitionOne() {
                return null;
            }

            @Override
            public R<ZoneNote> getNeedFileSynchronization() {
                return null;
            }

            /**
             * 获取一个需要识别的记录
             *
             * @param zoneNote
             */
            @Override
            public R<ZoneNote> getRandomOneByClassify(String classify) {
                return null;
            }

            /**
             * 更新记录
             *
             * @param zoneNote
             */
            @Override
            public R edit(ZoneNote zoneNote) {
                return null;
            }

            /**
             * 获取一个笔记
             */
            @Override
            public R randomOne() {
                return null;
            }

            @Override
            public List<ZoneNote> listInner(ZoneNote zoneNote) {
                return null;
            }

        };
    }
}
